function instanceOf(left,right){
    let leftvalue=left.__proto__;
    let rightvalue=right.prototype;
    while(true){
        if(leftvalue===rightvalue){
            return true;
        }
        if(leftvalue===null){
            return false;
        }
        leftvalue=leftvalue.__proto__;
    }
}
var arr=[2,3,4,5];
console.log(instanceOf(arr,Array));